
local zhudi = General(extension, "lingling__zhudi", "ming", 4)
table.insert(Fk.lords, "lingling__zhudi")
local zhengbian = fk.CreateActiveSkill{
  name = "lingling__zhengbian",
  anim_type = "offensive",
  card_num = 0,
  target_num = 1,
  prompt = "#lingling__zhengbian",
  can_use = Util.TrueFunc,
  card_filter = Util.FalseFunc,
  target_filter = function(self, player, to_select, selected)
    local to = Fk:currentRoom():getPlayerById(to_select)
    return #selected == 0 and (player:getLastAlive() == to or player:getNextAlive() == to)
  end,
  on_use = function(self, room, effect)
    local player = room:getPlayerById(effect.from)
    local target = room:getPlayerById(effect.tos[1])
    room:handleAddLoseSkills(player, "-lingling__zhengbian", nil, true, false)
    if not target.dead and not target:hasSkill(self, true) then
      room:handleAddLoseSkills(target, "lingling__zhengbian", nil, true, false)
    end
    if not target.dead then
      room:damage{
        from = player,
        to = target,
        damage = 1,
        skillName = self.name,
      }
    end
  end,

  on_lose = function (self, player, is_death)
    if is_death then
      local room = player.room
      for _, p in ipairs(room:getAlivePlayers()) do
        if (p.general == "lingling__zhudi" or p.deputyGeneral == "lingling__zhudi") and not p:hasSkill(self, true) then
          room:handleAddLoseSkills(p, "lingling__zhengbian", nil, true, false)
        end
      end
    end
  end,
}
local huantu = fk.CreateTriggerSkill{
  name = "lingling__huantu",
  anim_type = "drawcard",
  frequency = Skill.Compulsory,
  events = {fk.Damaged},
  on_trigger = function(self, event, target, player, data)
    self.cancel_cost = false
    for i = 1, data.damage do
      if i > 1 and (self.cancel_cost or not player:hasSkill(self)) then return false end
      self:doCost(event, target, player, data)
    end
  end,
  on_use = function (self, event, target, player, data)
    local room = player.room
    local to = player
    if player:usedSkillTimes("lingling__jingnan", Player.HistoryGame) == 0 then
      to = room:askForChoosePlayers(player, {player:getNextAlive().id, player:getLastAlive().id}, 1, 1,
        "#lingling__huantu-choose", self.name, false)
      to = room:getPlayerById(to[1])
    end
    local choice = room:askForChoice(to, {"basic", "trick", "equip"}, self.name, "#lingling__huantu-choice:" .. player.id)
    room:sendLog{
      type = "#HuantuDeclareType",
      from = to.id,
      arg = choice,
    }
    local n = player:usedSkillTimes("lingling__jingnan", Player.HistoryGame) > 0 and 2 or 1
    local cid = room:getCardsFromPileByRule(".|.|.|.|.|"..choice, n, "allPiles")
    if #cid > 0 then
      if player:hasSkill("lingling__jingnan", true) and player:usedSkillTimes("lingling__jingnan", Player.HistoryGame) == 0 then
        room:addPlayerMark(player, "@lingling__jingnan_record", 1)
      end
      room:obtainCard(player, cid, false, fk.ReasonJustMove, nil, self.name )
    end
  end,
}
local jingnan = fk.CreateTriggerSkill{
  name = "lingling__jingnan",
  frequency = Skill.Wake,
  events = {fk.AfterSkillEffect},
  can_trigger = function (self, event, target, player, data)
    return target == player and player:hasSkill(self) and data.name == "lingling__huantu" and
      player:usedSkillTimes(self.name, Player.HistoryGame) == 0
  end,
  can_wake = function (self, event, target, player, data)
    return player:getMark("@lingling__jingnan_record") > 2
  end,
  on_use = function (self, event, target, player, data)
    local room = player.room
    room:setPlayerMark(player, "@lingling__jingnan_record", 0)
    room:changeMaxHp(player, -1)
    if player.dead then return end
    if not player:isWounded() then
      player:drawCards(2, self.name)
    else
      local choices = {"draw2", "recover"}
      local choice = room:askForChoice(player, choices, self.name)
      if choice == "recover" then
        room:recover{
          who = player,
          num = 1,
          skillName = self.name
        }
      else
        player:drawCards(2, self.name)
      end
    end
    if player.dead then return end
    room:handleAddLoseSkills(player, "lingling__yongle")
  end,
}
local yongle = fk.CreateViewAsSkill{
  name = "lingling__yongle",
  anim_type = "special",
  pattern = ".",
  prompt = "#lingling__yongle",
  interaction = function(self)
    local all_names = Fk:getAllCardNames("bt")
    local names = player:getViewAsCardNames(player, self.name, all_names, {}, player:getTableMark("lingling__yongle-turn"))
    if #names > 0 then
      return UI.CardNameBox { choices = names, all_choices = all_names }
    end
  end,
  card_filter = function(self, player, to_select, selected)
    if not self.interaction.data or #selected > 1 then return end
    local type = Fk:cloneCard(self.interaction.data).type
    if Fk:getCardById(to_select).type ~= type then
      if #selected == 0 then
        return true
      else
        return Fk:getCardById(to_select).type ~= Fk:getCardById(selected[1]).type
      end
    end
  end,
  view_as = function(self, player, cards)
    if not self.interaction.data or #cards ~= 2 then return end
    local card = Fk:cloneCard(self.interaction.data)
    card.skillName = self.name
    card:addSubcards(cards)
    return card
  end,
  before_use =  function (self, player, use)
    player.room:addTableMark(player, "lingling__yongle-turn", use.card.trueName)
  end,
  enabled_at_play = Util.TrueFunc,
  enabled_at_response = function(self, player, response)
    return not response
  end,
}
zhudi:addSkill(zhengbian)
zhudi:addSkill(huantu)
zhudi:addSkill(jingnan)
zhudi:addRelatedSkill(yongle)
Fk:loadTranslationTable{
  ["lingling__zhudi"] = "朱棣",
  ["#lingling__zhudi"] = "永乐大帝",
  ["designer:lingling__zhudi"] = "伶",
  ["illustrator:lingling__zhudi"] = "珊瑚虫",
  ["lingling__zhengbian"] = "征边",
  [":lingling__zhengbian"] = "出牌阶段，你可以失去此技能，令上家或下家获得此技能，然后对其造成1点伤害。你死亡时，朱棣获得此技能。",
  ["lingling__huantu"] = "缓图",
  [":lingling__huantu"] = "当你受到1点伤害后，你从牌堆获得一张由你指定的邻家声明类型的牌。",
  ["lingling__jingnan"] = "靖难",
  [":lingling__jingnan"] = "觉醒技，当你因〖缓图〗累计获得三张牌后，你减1点体力上限，回复1点体力或摸两张牌，〖缓图〗改为由你声明类型且"..
  "描述中的“一张”改为“两张”，然后获得〖永乐〗。",
  ["lingling__yongle"] = "永乐",
  [":lingling__yongle"] = "你可以将两张类型不同的牌当另一种类型的任意牌使用（每回合每种牌名限一次，不能当装备牌和延时锦囊牌）。"..
  "<br><br> <font color='#a40000'>洪武、永乐所行之事，远迈前王。</font>",
  ["#lingling__zhengbian"] = "征边：你可以对上家或下家造成1点伤害，你失去此技能，其获得此技能",
  ["#lingling__huantu-choose"] = "缓图：你可以选择一名邻家，其声明一种类型并令你获得一张该类型的牌",
  ["#lingling__huantu-choice"] = "缓图：%src 令你声明一种类别，令其获得此类别的牌",
  ["#HuantuDeclareType"] = "%from 声明了 %arg",
  ["@lingling__jingnan_record"] = "靖难",
  ["#lingling__yongle"] = "永乐：将两张类型不同的牌当另一种类型的牌使用",

  ["$lingling__jingnan1"] = "过家家的游戏就到此为止吧。",
  ["$lingling__jingnan2"] = "过家家的游戏就到此为止吧。",
}

local wangshouren = General(extension, "lingling__wangshouren", "ming", 3)
local gewu = fk.CreateTriggerSkill{
  name = "lingling__gewu",
  anim_type = "control",
  events = {fk.EventPhaseStart},
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(self) and target ~= player and target.phase == Player.Play and not player:isNude() and not target.dead
  end,
  on_cost = function(self, event, target, player, data)
    local card = player.room:askForCard(player, 1, 1, true, self.name, true, ".|.|heart",
     "#lingling__gewu-invoke::"..target.id)
    if #card > 0 then
      self.cost_data = {tos = {target.id}, cards = card}
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:moveCardTo(self.cost_data.cards, Card.PlayerHand, target, fk.ReasonGive, self.name, nil, true, player.id)
    if target.dead then return end
    local choice = room:askForChoice(target, {"lingling__gewu1", "lingling__gewu2:"..player.id}, self.name)
    if choice == "lingling__gewu1" then
      local yes = true
      for i = 1, 2, 1 do
        local judge = {
          who = target,
          reason = self.name,
          pattern = ".|.|spade,club",
        }
        room:judge(judge)
        if judge.card.color == Card.Red then
          yes = false
          if not target.dead then
            room:loseHp(target, 1, self.name)
          end
        end
        if target.dead then return end
      end
      if yes and not player.dead then
        room:setPlayerMark(player, "@@lingling__gewu-phase", target.id)
      end
    else
      room:setPlayerMark(player, "@@lingling__gewu-phase", target.id)
    end
  end,
}
local gewu_delay = fk.CreateTriggerSkill{
  name = "#lingling__gewu_delay",
  anim_type = "control",
  events = {fk.CardUseFinished},
  can_trigger = function(self, event, target, player, data)
    return player:getMark("@@lingling__gewu-phase") == target.id and not target.dead and not target:isNude()
  end,
  on_cost = function(self, event, target, player, data)
    if player.room:askForSkillInvoke(player, "lingling__gewu", nil, "#lingling__gewu-ask::"..target.id) then
      self.cost_data = {tos = {target.id}}
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local card = room:askForCardChosen(player, target, "he", "lingling__gewu", "#lingling__gewu-prey::"..target.id)
    if Fk:getCardById(card).suit == Card.Heart then
      room:setPlayerMark(player, "@@lingling__gewu-phase", 0)
    end
    room:moveCardTo(card, Card.PlayerHand, player, fk.ReasonPrey, "lingling__gewu", nil, false, player.id)
  end,
}
local qiuxin = fk.CreateTriggerSkill{
  name = "lingling__qiuxin",
  anim_type = "masochism",
  frequency = Skill.Compulsory,
  events = {fk.Damaged},
  on_trigger = function(self, event, target, player, data)
    for _ = 1, data.damage do
      if not player:hasSkill(self) then break end
      self:doCost(event, target, player, data)
    end
  end,
  on_use = function (self, event, target, player, data)
    local room = player.room
    local cards = room:getCardsFromPileByRule(".|.|heart", 2, "allPiles")
    if #cards > 0 then
      room:moveCardTo(cards, Card.PlayerHand, player, fk.ReasonJustMove, self.name, nil, false, player.id)
    end
  end,
}
Fk:loadTranslationTable{
  ["lingling__wangshouren"] = "王守仁",
  ["#lingling__wangshouren"] = "龙场悟道",
  ["designer:lingling__wangshouren"] = "伶",
  ["illustrator:lingling__wangshouren"] = "珊瑚虫",

  ["lingling__gewu"] = "格物",
  [":lingling__gewu"] = "其他角色出牌阶段开始时，你可以交给其一张<font color='red'>♥</font>牌，其选择：判定两次，若为红色则失去1点体力，"..
  "若皆为黑色则执行另一项；本阶段其每使用一张牌结算后，你便可以获得其一张牌，直到获得<font color='red'>♥</font>牌。",
  ["lingling__qiuxin"] = "求心",
  [":lingling__qiuxin"] = "当你受到1点伤害后，你随机获得两张<font color='red'>♥</font>牌。",
  ["#lingling__gewu-invoke"] = "格物：交给 %dest 一张<font color='red'>♥</font>牌，令其选择判定并失去体力或你获得其牌",
  ["lingling__gewu1"] = "判定两次，若为红色则失去1点体力，若均为黑色则执行下一项",
  ["lingling__gewu2"] = "本阶段你使用牌结算后，%src 可以获得你一张牌",
  ["@@lingling__gewu-phase"] = "格物中…",
  ["#lingling__gewu_delay"] = "格物",
  ["#lingling__gewu-ask"] = "格物：是否获得 %dest 一张牌？",
  ["#lingling__gewu-prey"] = "格物：获得 %dest 一张牌",
}

local zhengchenggong = General(extension, "lingling__zhengchenggong", "ming", 4)
local tingzhen = fk.CreateTriggerSkill{
  name = "lingling__tingzhen",
  anim_type = "offensive",
  frequency = Skill.Compulsory,
  events = {fk.CardUsing, fk.CardUseFinished},
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(self) then
      local use_event = player.room.logic:getCurrentEvent()
      if player.room:getBanner("RoundCount") % 2 == 1 then
        return event == fk.CardUsing and data.card.trueName == "slash" and
          #player.room.logic:getEventsOfScope(GameEvent.UseCard, 2, function (e)
            if e.id <= use_event.id and e.id > player:getMark("lingling__bizou_flag") then
              local use = e.data[1]
              return use.from == player.id and use.card.trueName == "slash" and
                player:usedCardTimes(use.card.trueName, Player.HistoryRound) > 0
            end
          end, Player.HistoryRound) == 1
      else
        return event == fk.CardUseFinished and data.card.type == Card.TypeTrick and
          #player.room.logic:getEventsOfScope(GameEvent.UseCard, 2, function (e)
            if e.id <= use_event.id and e.id > player:getMark("lingling__bizou_flag") then
              local use = e.data[1]
              return use.from == player.id and use.card.type == Card.TypeTrick and
                player:usedCardTimes(use.card.trueName, Player.HistoryRound) > 0
            end
          end, Player.HistoryRound) == 1
      end
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local use_event = player.room.logic:getCurrentEvent()
    if event == fk.CardUsing then
      data.additionalDamage = (data.additionalDamage or 0) + 1
      if player:getMark("lingling__tingzhen1") == 0 then
        room:setPlayerMark(player, "lingling__tingzhen1", 1)
        if #room.logic:getEventsOfScope(GameEvent.UseCard, 2, function (e)
          if e.id <= use_event.id then
            local use = e.data[1]
            return use.from == player.id and use.card.trueName == "slash"
          end
        end, Player.HistoryGame) == 1 then
          data.additionalDamage = data.additionalDamage + 1
        end
      end
    elseif event == fk.CardUseFinished then
      room:addPlayerMark(player, MarkEnum.SlashResidue.."-round", 1)
      player:drawCards(2, self.name)
      if player:getMark("lingling__tingzhen2") == 0 and not player.dead then
        room:setPlayerMark(player, "lingling__tingzhen2", 1)
        if #room.logic:getEventsOfScope(GameEvent.UseCard, 2, function (e)
          if e.id <= use_event.id then
            local use = e.data[1]
            return use.from == player.id and use.card.type == Card.TypeTrick
          end
        end, Player.HistoryGame) == 1 then
          player:drawCards(2, self.name)
        end
      end
    end
  end,
}
local bizou = fk.CreateActiveSkill{
  name = "lingling__bizou",
  anim_type = "control",
  card_num = 0,
  target_num = 0,
  prompt = "#lingling__bizou",
  can_use = function(self, player)
    return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
  end,
  card_filter = Util.FalseFunc,
  on_use = function(self, room, effect)
    local player = room:getPlayerById(effect.from)
    local roundCount = room:getBanner("RoundCount")
    roundCount = roundCount + 1
    room:setTag("RoundCount",  roundCount)
    room:doBroadcastNotify("UpdateRoundNum", roundCount)
    room:loseHp(player, 1, self.name)
    if player.dead then return end
    local e = room.logic:getCurrentEvent():findParent(GameEvent.SkillEffect, true)
    room:setPlayerMark(player, "lingling__bizou_flag", e.id)
    player:setCardUseHistory("", 0, Player.HistoryRound)
    local targets = table.filter(room.alive_players, function (p)
      return player:getNextAlive() == p or player:getLastAlive() == p
    end)
    local to = room:askForChoosePlayers(player, table.map(targets, Util.IdMapper), 1, 1,
      "#lingling__bizou-choose", self.name, true)
    if #to > 0 then
      to = room:getPlayerById(to[1])
      room:setPlayerMark(to, MarkEnum.PlayerRemoved.."-turn", 1)
      room:setPlayerMark(to, "@@lingling__bizou-turn", 1)
    end
  end,
}
local bizou_prohibit = fk.CreateProhibitSkill{
  name = "#lingling__bizou_prohibit",
  prohibit_use = function(self, player, card)
    return card and player:getMark("@@lingling__bizou-turn") ~= 0
  end,
  is_prohibited = function(self, from, to, card)
    return card and to:getMark("@@lingling__bizou-turn") ~= 0
  end,
}
local bizou_trigger = fk.CreateTriggerSkill{
  name = "#lingling__bizou_trigger",

  refresh_events = {fk.PreHpRecover, fk.PreHpLost, fk.DamageInflicted},
  can_refresh = function(self, event, target, player, data)
    return target == player and player:getMark("@@lingling__bizou-turn") ~= 0
  end,
  on_refresh = function(self, event, target, player, data)
    if event == fk.DamageInflicted then
      data.damage = 0
    else
      data.num = 0
    end
  end,
}
local weiyuan = fk.CreateTriggerSkill{
  name = "lingling__weiyuan",
  anim_type = "defensive",
  frequency = Skill.Compulsory,
  events = {fk.GameStart},
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(self)
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local n = #table.filter(room.alive_players, function (p)
      return table.find(p:getCardIds("h"), function (id)
        return Fk:getCardById(id).trueName == "jink"
      end)
    end)
    if n > 0 then
      room:changeShield(player, n)
    end
  end,
}
Fk:loadTranslationTable{
  ["lingling__zhengchenggong"] = "郑成功",
  ["#lingling__zhengchenggong"] = "国姓爷",
  ["designer:lingling__zhengchenggong"] = "伶",
  ["illustrator:lingling__zhengchenggong"] = "珊瑚虫",

  ["lingling__tingzhen"] = "廷震",
  [":lingling__tingzhen"] = "奇数轮内，本轮你使用首张【杀】伤害+1，若为本局游戏首次使用【杀】则再+1。偶数轮内，本轮你使用首张锦囊牌后，"..
  "你摸两张牌且使用【杀】的次数上限+1，若为本局游戏首次使用锦囊牌则再摸两张牌。",
  ["lingling__bizou"] = "避走",
  [":lingling__bizou"] = "出牌阶段限一次，你可以失去1点体力令轮次数+1，本轮你视为未使用牌，然后你可以将一名邻家调离至回合结束。",
  ["lingling__weiyuan"] = "威远",
  [":lingling__weiyuan"] = "游戏开始时，你获得X点护甲（X为手牌中有【闪】的角色数），至多获得4点。"..
  "<br><br> <font color = '#a40000'>孤臣秉孤忠，浩气磅礴留千古；<br>正人扶正气，莫教成败论英雄。",
  ["#lingling__bizou"] = "避走：你可以失去1点体力令轮次数+1，然后可以调离一名邻家",
  ["#lingling__bizou-choose"] = "避走：你可以调离一名邻家至回合结束",
  ["@@lingling__bizou-turn"] = "被调离",
}

local changyuchun = General(extension, "lingling__changyuchun", "ming", 4)
local chenzhi = fk.CreateActiveSkill{
  name = "lingling__chenzhi",
  anim_type = "control",
  card_num = 0,
  target_num = 1,
  prompt = "#lingling__chenzhi",
  can_use = function(self, player)
    return player:usedSkillTimes(self.name, Player.HistoryPhase) == 0
  end,
  card_filter = Util.FalseFunc,
  target_filter = function(self, to_select, selected, selected_cards)
    return #selected == 0 and to_select ~= player.id and #Fk:currentRoom():getPlayerById(to_select):getCardIds("he") > 1
  end,
  on_use = function(self, room, effect)
    local player = room:getPlayerById(effect.from)
    local target = room:getPlayerById(effect.tos[1])
    room:addPlayerMark(target, self.name, 1)
    local cards = room:askForCardsChosen(player, target, 2, 2, "he", self.name, "#lingling__chenzhi-ask::"..target.id)
    room:moveCards{
      ids = cards,
      from = target.id,
      toArea = Card.DrawPile,
      moveReason = fk.ReasonPut,
      skillName = self.name,
      drawPilePosition = -1,
      moveVisible = false,
      proposer = player.id,
    }
  end,
}
local chenzhi_delay = fk.CreateTriggerSkill{
  name = "#lingling__chenzhi_delay",
  anim_type = "drawcard",
  events = {fk.TurnStart},
  can_trigger = function(self, event, target, player, data)
    return target == player and player:getMark("lingling__chenzhi") > 0
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local n = player:getMark("lingling__chenzhi")
    room:setPlayerMark(player, "lingling__chenzhi", 0)
    for _ = 1, n, 1 do
      if player.dead then return end
      player:drawCards(1, "lingling__chenzhi")
      for i = 1, 3, 1 do
        if player.dead or player:isNude() then break end
        if #room:askForDiscard(player, 1, 1, true, "lingling__chenzhi", true, nil, "#lingling__chenzhi-discard") > 0 then
          if player.dead then return end
          player:drawCards(1, "lingling__chenzhi", "bottom")
        else
          break
        end
      end
    end
  end,
}
local cuifeng = fk.CreateTriggerSkill{
  name = "lingling__cuifeng",
  switch_skill_name = "lingling__cuifeng",
  anim_type = "switch",
  events = {fk.Damage},
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(self) and data.card and data.card.trueName == "slash" then
      if player:getSwitchSkillState(self.name, false) == fk.SwitchYang then
        if not data.to.dead then
          if data.to == player then
            return #player:getCardIds("e") > 0
          else
            return not data.to:isNude()
          end
        end
      else
        return true
      end
    end
  end,
  on_cost = function (self, event, target, player, data)
    local room = player.room
    if player:getSwitchSkillState(self.name, false) == fk.SwitchYang then
      return room:askForSkillInvoke(player, self.name, nil, "#lingling__cuifeng-yang::"..data.to.id)
    else
      return room:askForSkillInvoke(player, self.name, nil, "#lingling__cuifeng-yin")
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    if player:getSwitchSkillState(self.name, true) == fk.SwitchYang then
      local flag = data.to == player and "e" or "he"
      local card = room:askForCardChosen(player, data.to, flag, self.name, "#lingling__cuifeng-prey::"..data.to.id)
      room:moveCardTo(card, Card.PlayerHand, player, fk.ReasonPrey, self.name, nil, false, player.id)
    else
      player:drawCards(1, self.name, "bottom")
    end
  end
}
local cuifeng_trigger = fk.CreateTriggerSkill{
  name = "#lingling__cuifeng_trigger",
  anim_type = "offensive",
  events = {fk.AfterCardTargetDeclared},
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(cuifeng) and data.card.trueName == "slash" and
      player:usedSkillTimes(self.name, Player.HistoryTurn) == 0 and
      table.find({player:getNextAlive().id, player:getLastAlive().id}, function(id)
        return table.contains(player.room:getUseExtraTargets(data, true), id) or
        table.contains(TargetGroup:getRealTargets(data.tos), id)
      end)
  end,
  on_cost = function(self, event, target, player, data)
    local room = player.room
    local targets = table.filter({player:getNextAlive().id, player:getLastAlive().id}, function(id)
      return table.contains(room:getUseExtraTargets(data, true), id) or
      table.contains(TargetGroup:getRealTargets(data.tos), id)
    end)
    local tos = room:askForChoosePlayers(player, targets, 1, 1,
      "#lingling__cuifeng-choose:::"..data.card:toLogString(), "lingling__cuifeng", true)
    if #tos > 0 then
      self.cost_data = {tos = tos}
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    if table.contains(TargetGroup:getRealTargets(data.tos), self.cost_data.tos[1]) then
      data.additionalEffect = (data.additionalEffect or 0) + 1
    else
      table.insert(data.tos, self.cost_data.tos)
    end
  end,
}
Fk:loadTranslationTable{
  ["lingling__changyuchun"] = "常遇春",
  ["#lingling__changyuchun"] = "横行天下",
  ["designer:lingling__changyuchun"] = "伶",
  ["illustrator:lingling__changyuchun"] = "珊瑚虫",

  ["lingling__chenzhi"] = "沉鸷",
  [":lingling__chenzhi"] = "出牌阶段限一次，你可以将一名其他角色的两张牌置于牌堆底。其下回合开始时摸一张牌，且其可以弃置一张牌然后获得"..
  "牌堆底一张牌，可以重复至多三次。",
  ["lingling__cuifeng"] = "摧锋",
  [":lingling__cuifeng"] = "转换技，当你使用【杀】造成伤害后，你可以获得①目标角色②牌堆底一张牌。每回合限一次，你使用【杀】可以额外指定一名"..
  "邻家为目标，或对一名邻家额外结算一次。"..
  "<br><br> <font color = '#a40000'>当百万之众勇敢先登，摧锋陷阵，所向披靡，莫如副将军遇春信矣哉。",
  ["#lingling__chenzhi"] = "沉鸷：将一名角色两张牌置于牌堆底，其下回合开始时摸一张牌",
  ["#lingling__chenzhi-ask"] = "沉鸷：将 %dest 两张牌置于牌堆底",
  ["#lingling__chenzhi-discard"] = "沉鸷：是否弃置一张牌，获得牌堆底一张牌？",
  ["#lingling__chenzhi_delay"] = "沉鸷",
  ["#lingling__cuifeng-yang"] = "摧锋：是否获得 %dest 一张牌？",
  ["#lingling__cuifeng-yin"] = "摧锋：是否获得牌堆底一张牌？",
  ["#lingling__cuifeng-prey"] = "摧锋：获得 %dest 一张牌",
  ["#lingling__cuifeng_trigger"] = "摧锋",
  ["#lingling__cuifeng-choose"] = "摧锋：你可以为此%arg增加一名邻家为目标，或对一名邻家额外结算一次",
}
